public class Text1010 {
    public static void hanoi(int n, char source, char auxiliary, char destination) {
        if (n == 1) {
            System.out.println("Move disk 1 from " + source + " to " + destination);
            return;
        }

        hanoi(n - 1, source, destination, auxiliary);
        System.out.println("Move disk " + n + " from " + source + " to " + destination);
        hanoi(n - 1, auxiliary, source, destination);
    }


    public static void main(String[] args) {
        int numDisks = 3;  // 这里可以修改盘子的数量
        hanoi(numDisks, 'A', 'B', 'C');
    }












    //
    public static int max10(int x, int y) {
        return x > y ? x : y;
    }
    public static int max10(int x, int y,int z) {
        int t = x>y ? x : y;
        return t>z ? t : z;
    }

    public static void main4(String[] args) {
        int x = 5;
        int y = 16;
        int z = 55;
        int ret = max10(x, y);
        System.out.println(ret);
        ret = max10(x, y,z);
        System.out.println(ret);
    }





    public static int mymax(int x, int y){
        return x > y ? x : y;
    }
    public static int mymax(int x, int y,int z){
        int t = x > y ? x : y;
        return  t> z ? t : z;
    }


    public static void main3(String[] args) {
        int x = 10;
        int y = 20;
        int z = 5;
        int ret = mymax(x,y,z);
        System.out.println(ret);
        ret = mymax(x,y);
        System.out.println(ret);
    }





    public static int fib(int n) {
        if(n<3){
            return n;
        }
        else {
            int f1 = 1;
            int f2 = 1;
            int f3 = f1+f2;
            for (int i = 3; i <= n ; i++) {
                f3 = f1 + f2;
                f1 = f2;
                f2 = f3;
            }
            return f3;
        }
    }
    public static void main2(String[] args) {
        int ret = fib(8);
        System.out.println(ret);
    }









    public static int max2(int x, int y){
        return x > y ? x: y;
    }
    public static int max3(int x, int y, int z){
        return max2(x, y) > z ? max2(x, y) : z;
    }
    public static void main1(String[] args) {
        int x = 10;
        int y = 20;
        int z = 5;
        int ret = max2(x,y);
        System.out.println(ret);
        ret = max3(x,y,z);
        System.out.println(ret);
    }
}
